{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "7765UFHoyGx6"
   },
   "source": [
    "##### Copyright 2019 The TensorFlow Authors."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "cellView": "form",
    "colab": {},
    "colab_type": "code",
    "id": "KVtTDrUNyL7x"
   },
   "outputs": [],
   "source": [
    "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n",
    "# you may not use this file except in compliance with the License.\n",
    "# You may obtain a copy of the License at\n",
    "#\n",
    "# https://www.apache.org/licenses/LICENSE-2.0\n",
    "#\n",
    "# Unless required by applicable law or agreed to in writing, software\n",
    "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
    "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
    "# See the License for the specific language governing permissions and\n",
    "# limitations under the License."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "xPYxZMrWyA0N"
   },
   "source": [
    "# Boosted trees using Estimators"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "p_vOREjRx-Y0"
   },
   "source": [
    "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
    "  <td>\n",
    "    <a target=\"_blank\" href=\"https://www.tensorflow.org/tutorials/estimator/boosted_trees\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n",
    "  </td>\n",
    "  <td>\n",
    "    <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/estimator/boosted_trees.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
    "  </td>\n",
    "  <td>\n",
    "    <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/tutorials/estimator/boosted_trees.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\">View source on GitHub</a>\n",
    "  </td>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "dW3r7qVxzqN5"
   },
   "source": [
    "This tutorial is an end-to-end walkthrough of training a Gradient Boosting  model using decision trees with the `tf.estimator` API. Boosted Trees models are among the most popular and effective machine learning approaches for both regression and classification. It is an ensemble technique that combines the predictions from several (think 10s, 100s or even 1000s) tree models.\n",
    "\n",
    "Boosted Trees models are popular with many machine learning practitioners as they can achieve impressive performance with minimal hyperparameter tuning."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "eylrTPAN3rJV"
   },
   "source": [
    "## Load the titanic dataset\n",
    "You will be using the titanic dataset, where the (rather morbid) goal is to predict passenger survival, given characteristics such as gender, age, class, etc."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "KuhAiPfZ3rJW"
   },
   "outputs": [],
   "source": [
    "from __future__ import absolute_import, division, print_function, unicode_literals\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from IPython.display import clear_output\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "# Load dataset.\n",
    "dftrain = pd.read_csv('https://storage.googleapis.com/tf-datasets/titanic/train.csv')\n",
    "dfeval = pd.read_csv('https://storage.googleapis.com/tf-datasets/titanic/eval.csv')\n",
    "y_train = dftrain.pop('survived')\n",
    "y_eval = dfeval.pop('survived')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "NFtnFm1T0kMf"
   },
   "outputs": [],
   "source": [
    "try:\n",
        "  %tensorflow_version 2.x\n",
        "except Exception:\n",
        "  pass\n",
    "import tensorflow as tf\n",
    "tf.random.set_seed(123)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "3ioodHdVJVdA"
   },
   "source": [
    "The dataset consists of a training set and an evaluation set:\n",
    "\n",
    "* `dftrain` and `y_train` are the *training set*—the data the model uses to learn.\n",
    "* The model is tested against the *eval set*, `dfeval`, and `y_eval`.\n",
    "\n",
    "For training you will use the following features:\n",
    "\n",
    "\n",
    "<table>\n",
    "  <tr>\n",
    "    <th>Feature Name</th>\n",
    "    <th>Description</th>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>sex</td>\n",
    "    <td>Gender of passenger</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>age</td>\n",
    "    <td>Age of passenger</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>n_siblings_spouses</td>\n",
    "    <td>siblings and partners aboard</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>parch</td>\n",
    "    <td>of parents and children aboard</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>fare</td>\n",
    "    <td>Fare passenger paid.</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>class</td>\n",
    "    <td>Passenger's class on ship</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>deck</td>\n",
    "    <td>Which deck passenger was on</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>embark_town</td>\n",
    "    <td>Which town passenger embarked from</td>\n",
    "  </tr>\n",
    "    <tr>\n",
    "    <td>alone</td>\n",
    "    <td>If passenger was alone</td>\n",
    "  </tr>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "AoPiWsJALr-k"
   },
   "source": [
    "## Explore the data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "slcat1yzmzw5"
   },
   "source": [
    "Let's first preview some of the data and create summary statistics on the training set."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 204
    },
    "colab_type": "code",
    "id": "15PLelXBlxEW",
    "outputId": "b300d1e6-b3c2-476e-c7a2-a5a00d3ef03f"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>n_siblings_spouses</th>\n",
       "      <th>parch</th>\n",
       "      <th>fare</th>\n",
       "      <th>class</th>\n",
       "      <th>deck</th>\n",
       "      <th>embark_town</th>\n",
       "      <th>alone</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>Third</td>\n",
       "      <td>unknown</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>n</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>First</td>\n",
       "      <td>C</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>n</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>Third</td>\n",
       "      <td>unknown</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>y</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>First</td>\n",
       "      <td>C</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>n</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>male</td>\n",
       "      <td>28.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8.4583</td>\n",
       "      <td>Third</td>\n",
       "      <td>unknown</td>\n",
       "      <td>Queenstown</td>\n",
       "      <td>y</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      sex   age  n_siblings_spouses  parch  ...  class     deck  embark_town alone\n",
       "0    male  22.0                   1      0  ...  Third  unknown  Southampton     n\n",
       "1  female  38.0                   1      0  ...  First        C    Cherbourg     n\n",
       "2  female  26.0                   0      0  ...  Third  unknown  Southampton     y\n",
       "3  female  35.0                   1      0  ...  First        C  Southampton     n\n",
       "4    male  28.0                   0      0  ...  Third  unknown   Queenstown     y\n",
       "\n",
       "[5 rows x 9 columns]"
      ]
     },
     "execution_count": 0,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dftrain.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 297
    },
    "colab_type": "code",
    "id": "j2hiM4ETmqP0",
    "outputId": "e8b8cc92-0a70-44bd-b7a6-54b16bb0ed63"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>n_siblings_spouses</th>\n",
       "      <th>parch</th>\n",
       "      <th>fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>627.000000</td>\n",
       "      <td>627.000000</td>\n",
       "      <td>627.000000</td>\n",
       "      <td>627.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>29.631308</td>\n",
       "      <td>0.545455</td>\n",
       "      <td>0.379585</td>\n",
       "      <td>34.385399</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>12.511818</td>\n",
       "      <td>1.151090</td>\n",
       "      <td>0.792999</td>\n",
       "      <td>54.597730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.750000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>23.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>7.895800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>28.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>15.045800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>35.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>31.387500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>80.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>512.329200</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              age  n_siblings_spouses       parch        fare\n",
       "count  627.000000          627.000000  627.000000  627.000000\n",
       "mean    29.631308            0.545455    0.379585   34.385399\n",
       "std     12.511818            1.151090    0.792999   54.597730\n",
       "min      0.750000            0.000000    0.000000    0.000000\n",
       "25%     23.000000            0.000000    0.000000    7.895800\n",
       "50%     28.000000            0.000000    0.000000   15.045800\n",
       "75%     35.000000            1.000000    0.000000   31.387500\n",
       "max     80.000000            8.000000    5.000000  512.329200"
      ]
     },
     "execution_count": 0,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dftrain.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "-IR0e8V-LyJ4"
   },
   "source": [
    "There are 627 and 264 examples in the training and evaluation sets, respectively."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 34
    },
    "colab_type": "code",
    "id": "_1NwYqGwDjFf",
    "outputId": "b9901780-2cbc-4731-c040-21b79a245c3f"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(627, 264)"
      ]
     },
     "execution_count": 0,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dftrain.shape[0], dfeval.shape[0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "28UFJ4KSMK3V"
   },
   "source": [
    "The majority of passengers are in their 20's and 30's."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 279
    },
    "colab_type": "code",
    "id": "CaVDmZtuDfux",
    "outputId": "df4752dc-9976-4db1-9f09-6a057c1b6f46"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEGCAYAAACHGfl5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFddJREFUeJzt3W1sU+fBxvHLcRKHEQxOljqpw4agH8KLphCCmMQeaU2E\nBisUoX5oeFmzql2l0YSNLmK0S0jKS6cQOqYmgoGmSWiiQdVWYAbBYE2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DH/5Q9+7dG9X6bFUGeXl5unbtWvQb\nIxKJ6Pr168rNzU1wsv7ZOW99fb0uX76sn//855IeZG1vb48u7+zslMPhSOhfso968cUXderUKVtt\n09OnT+vSpUsqLS1VSUmJrl27ptdff12XL1+23bb0er2SpLS0NK1atUpnz57Vs88+a6uczz77rFJT\nU/Xtb39bkvS1r31NWVlZcrlcun79ui32+aOuX7+uM2fOaNmyZZLs9/N+4cIF3bhxQ4WFhZIe3Pp/\nwoQJcrlco8ppqzLIyspSQUGB/H6/JMnv92vWrFkJP1R83MONbNe8O3fu1Pnz57Vr1y6lpj44Ezhn\nzhz19PRE73F+4MABLVmyJGEZ7927F/Opdy0tLZoyZYqysrI0c+ZMW2zTN954Q3/84x/1ySefqKWl\nRV6vV7/61a/02muv2Wpbdnd3686dO9Gvjx49qlmzZmn27Nm2yunxeLRgwYLoacFLly4pGAxq+vTp\ntvw5+vjjj/XNb35TkydPlmS/n/fc3Fx1dHTo0qVLkqR//vOfCgaDmjZt2qhy2u4dyP/617+0ceNG\nhUKh6G2vp02bluhY2rp1q06ePKlgMKgpU6bI4/HI7/fbLu/Fixe1bNkyTZs2Lfp29KlTp6qxsVFn\nz57Vpk2b1Nvbq/z8/IReZhgMBrV27Vp1d3crJSVFU6ZM0Y9//GPNnDnTdtv0odLSUu3Zsyd6aWlN\nTY0ttuWVK1e0bt06RSIRRSIRzZgxQ9XV1fryl79sq5wPs77zzjvq6upSWlqa3nrrLX3jG9+w5T5f\nvHixampqtHDhwuiY3XIeOXJEe/bskdPplCStW7dOJSUlo8ppuzIAADx5tjpNBABIDMoAAEAZAAAo\nAwCAKAMAgCgDAIAoAwCAKAMAgKT/Az96X9CTJZCZAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15df1c150>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dftrain.age.hist(bins=20)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "1pifWiCoMbR5"
   },
   "source": [
    "There are approximately twice as male passengers as female passengers aboard."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 274
    },
    "colab_type": "code",
    "id": "-WazAq30MO5J",
    "outputId": "77a2208b-a25f-4ee8-a31e-8cb3fb1a5f41"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZcAAAEBCAYAAAC0WehTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEpVJREFUeJzt3HtsU/X/x/FXW8YkG+Uy5xggMWh0gCaCGGMUjAN/gLc5\nBAOCaDIkUbkIGhVFbi7BAV5ZECPeIggSvC5GRZzGazQIGBSJTMXpHDAHs9ucm1vP9w+z/izrtuLe\n7anl+UhIOGen5/PqZ5/1tXMo9TiO4wgAAENetwPEUiAQ0Jo1axQIBNyOEkKm6JApeomYi0zRSeZM\nSV8uxcXFCfeNI1PnyBS9RMxFpugkc6akLhcAgDsoFwCAOcoFAGAu6ctlxIgR8vl8bscI8fl8GjBg\nAJk6QaboJWIuMkUnUTONGDGiy+fxJPNbkevq6pSenu52DAD4z+nq62dSl0uro0frFQwmztPMyEhX\ndXWd2zHCkCk6iZhJSsxcZIpOomXyej3q0yety+fpZpAl4QWDTkKVi6SEyyORKVqJmElKzFxkik4i\nZuqqpP83FwBA/FEuAABzlAsAwBzlAgAwR7kAAMxRLgAAc5QLAMAc5QIAMEe5AADMUS4AAHOUCwDA\nHOUCADBHuQAAzFEuAABzlAsAwBzlAgAwR7kAAMxRLgAAc5QLAMAc5QIAMEe5AADMUS4AAHOUCwDA\nHOUCADBHuQAAzHVzO0A8ZGSkux2hjczMnm5HaINM0TneTH82Nqs20BCjNEBiOiHKpaBwmw4f5Ycb\n7ih5KE+1bocA4ozbYgAAc5QLAMAc5QIAMEe5AADMUS4AAHOUCwDAHOUCADBHuQAAz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MdWwmj8ejgQMHqqCgQIsXL5bX61Vz\nc7OGDx+ue++9Vz169JD094vrypUr5TiOhgwZogcffFAnnXSSSabq6mrdeuutamhokNfrVe/evXX3\n3XdryJAhrq2pSJnuuecepaWltfszKMV+Tf3TmDFj9OSTT+qMM87ocNx4Zvpnrrq6OtM1lbTlAgBw\nT1LeFgMAuItyAQCYo1wAAOYoFwCAOcoFAGCOcgEAmKNcAADmKBcAgLn/AQvkwWROxmRCAAAAAElF\nTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15cb6afd0>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dftrain.sex.value_counts().plot(kind='barh')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "7_XkxrpmmVU_"
   },
   "source": [
    "The majority of passengers were in the \"third\" class."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 274
    },
    "colab_type": "code",
    "id": "zZ3PvVy4l4gI",
    "outputId": "147730b6-c79a-4864-9a40-b40e97383e8c"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEBCAYAAABBp2PjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFHBJREFUeJzt3V1wVPX9x/HP7pIHSUhIIqYxBkWjTRAq4LSxFZ/S2kFF\nMQN9kLRwQb1oJUypDCIGlDRTSaLFGVbCTPWCsUjrZIAaHEbKROpM2yEdMVMd7UwzFkNDIikkbgIh\nkN3zv2DI38DmAZJvzp7k/brKnt1z9rPnd9gP5+zO/nyO4zgCAMCI3+0AYyEUCmnr1q0KhUJuR7kq\n5HePl7NL5Hcb+S+YMEUTDAY9Pdjkd4eXs0vkdxv5L5gQRQMAcA9FAwAwRdEAAExNmKKZN2+eAoGA\n2zGuSiAQUHZ2Nvld4OXsEv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c8bKa7g0v8/n0w033KAVK1Zo48aN8vv96u3t1dy5c7V+/Xpd\nc801ki68KVZWVspxHOXn52vz5s1KTEwc0+wnT57UL37xC3V3d8vv92vq1Kl65plnlJ+f74njP1r+\ndevWKSkpacD3IOnqjp1xXzQAAHeN60tnAAD3UTQAAFMUDQDAFEUDADBF0QAATFE0AABTFA0AwBRF\nAwAw9X+gI1LNFj+FVgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15cb7aed0>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dftrain['class'].value_counts().plot(kind='barh')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "HM5SlwlxmZMT"
   },
   "source": [
    "Most passengers embarked from Southampton."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 274
    },
    "colab_type": "code",
    "id": "RVTSrdr4mZaC",
    "outputId": "3512101a-0913-48d3-d4b0-6e0fdc2ed34d"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbwAAAEBCAYAAAAD5BB0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtUVPXi/vH3zKCkAl7IiMArZnhLMTtKLf0a5clLpXhs\nLRPTymp1EY+30tJMyUw0syNUy45Wapa3xNSysshjJ1FWmZmZhZ0ML2CE2gAqCLN/f/hjjiiXUYGZ\nzud5reWK2TN774cPn+Zh7xn22CzLshAREfkfZ/d2AJM4nU6SkpJwOp3ejuKmTJ7xxUzgm7mUyTPK\n5LnqyqXCq0VOp5Pk5GSfmkzK5BlfzAS+mUuZPKNMnquuXCo8ERExggpPRESMoMITEREjqPBqWdeu\nXXE4HN6O4eZwOAgLC1OmKvhiJvDNXMrkGWXynMPhoGvXrpe9HZv+LKH25OfnExAQ4O0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Fk6dKlnDx5ssL1YmJieOedd9ynBYuKiti3b1+l+0pJSQHg2LFjbN26le7du9O6dWvOnDnj\nPtrbvn07xcXFtGzZkvDwcA4dOkReXh6WZfHBBx9Uuv3u3buzdu1a4Oyh9fbt2yt8bFBQEOHh4WX+\n6XSmiMilCw0NveB59WIKr1bepZmYmEhSUhKDBw+mbt26WJZFr169aNWqVYXrDBw4kBMnTjB8+HBs\nNhsul4thw4YRGRlZ7uNtNhuhoaHExcXx+++/88gjj7j/RGHBggXMnDnT/aaVpKQk/Pz8CAkJ4f77\n7yc2NpZmzZrRqVMn9u/fX2Gmp59+mkmTJrFp0yZat27NDTfcUO5Rq4iI+B6bVdWLbOJWWFiIn58f\nDoeDnJwc7r77bt566y1atmx5UdvRB8DWjg3zBuqUppcok2eUyTOlpzQvlz7x/CIcOHCASZMmYVkW\nJSUljB49+qLLTkREvEOFdxGuu+461q1b5+0YIiJyCXTpEBERMYIKT0REjKDCExERI6jwRETECCo8\nERExggpPRESMoMITEREj6O/wvGDx1L96O4IRThcWezuCiPgQFZ4X5Obm43L5zhXdfPFSQr6YSUT+\n3HRKU0REjKDCExERI6jwRETECCo8ERExggpPRESMoMITEREjqPBERMQIKjwRETGCCk9ERIygwhMR\nESOo8ERExAgqPBERMYIKT0REjKDCExERI6jwRETECCo8ERExggpPRESMoMITEREjqPBERMQIKjwR\nETGCCk9ERIygwhMRESOo8ERExAgqPBERMYIKT0REjKDCExERI9gsy7K8HUJERKSm+Xk7gIlGzfyE\n346f8nYMEZE/hasa12Px1L9e9nZ0SlNERIygwhMRESOo8ERExAgqPBERMYIKT0REjKDCExERI6jw\nRETECB4V3qZNm4iNjSU2Npb+/fszceLES97hvn372LRpU5llkZGRnDrlnb9LS09P58svv/TKvkVE\npPZU+YfnOTk5JCQksG7dOkJCQoCzpXWp9u7dy5YtW+jXr597mc1mu+TtXa709HQKCgq4+eabvZZB\nRERqXpWF9/vvv1OnTh0aNmzoXhYZGQnA1q1bmT9/Pi6XiyZNmp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ycpWq7jmlwqsFoaGhHD161D1RXC4Xv/32G1dffXWtZwkJ\nCQGgTp06DBs2jG+++YZrrrmGw4cPux9z7NgxbDZbrR3dQeVj5M3xK2+8SvPW1pglJiaSmZnJyy+/\nXOW+ayvX+Zngv2PVoEED7r77bvfFfs/PdOTIEUJDQ6s1z7nuuusuduzY4XNzqjTXH3/84ZV5lZ6e\nzi+//MKtt95KTEwMR48e5cEHHyQzM9Or86m8XKNGjWLbtm3VPqdUeLWgSZMmREZGsmHDBgA2bNhA\n+/bta/105qlTp8jPz3ff/uCDD2jfvj0dOnSgsLDQPZlWrFhBv379aiVT6RNOZWPkrfErb7zatWsH\nQMeOHWtlzObPn8/evXt59dVX8fPzq3LftZGrvExOp9P9Lrni4mI+/vhj91j17NmTPXv2uN8FuWLF\nCvr27VtteU6ePFnmdFZqaiqNGjWiSZMmtGvXzmtzqqJc/v7+XplXDz/8MFu3buWzzz4jNTWVkJAQ\n3njjDUaNGuXV+VRRrk6dOlX7nNKVVmrJf/7zHyZPnozT6aRhw4YkJibSsmXLWs1w8OBBxowZg8vl\nwuVyERERwdSpU7nyyivZtWsXzzzzDEVFRYSHhzN37lyaNGlSIzlmzpzJ5s2byc3NpVGjRjRu3JgN\nGzZUOkY1PX7lZXrttdeIj48vd7yAGh+z/fv3c+edd9KyZUv35ZSaNWtGUlIS33zzDdOmTSt33zWZ\n6/xMNpuN8PBwRo0axbRp07Db7RQXFxMVFcXTTz9NvXr1gLNP9nPmzMGyLNq1a8fs2bO54oorqiVT\nbm4ujz32GKdOncJut9OoUSMmTZpEu3btvDqnyss1efJkGjRoUOH/h1Dz86rUrbfeysKFC2nTpk2l\n+6zN54ZfhbmSAAAAQ0lEQVRzc+Xn51f7nFLhiYiIEXRKU0REjKDCExERI6jwRETECCo8ERExggpP\nRESMoMITEREjqPBERMQIKjwRETHC/wNAPMBcj8HpnQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15cfd73d0>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dftrain['embark_town'].value_counts().plot(kind='barh')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "aTn1niLPob3x"
   },
   "source": [
    "Females have a much higher chance of surviving vs. males. This will clearly be a predictive feature for the model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 292
    },
    "colab_type": "code",
    "id": "Eh3KW5oYkaNS",
    "outputId": "830984b0-0fbc-4d69-b107-9d4097b0549f"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAETCAYAAABjv5J2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGStJREFUeJzt3XtQlXXix/HP4YiMC/IzWVK8bVkm5tqkaWar0oLkjZvX\n0TK1UHdyTVvdzdE2766pmaWMl7ZWWbTZRVcHwcuq4H3Q8tKqG66psaSS4i0uKnDg+f3hykRgHOPA\n+SLv10wzci7P+YAO784jnmOzLMsSAACG8XD3gJogOztbS5cuVXZ2trun3FNN2Cix09XY6VrsdB1X\nbCRQTsjOzlZMTIzxfxhM3yix09XY6VrsdB1XbCRQAAAjESgAgJEIFADASATKSR06dJDdbnf3jHuy\n2+1q2rSp0RsldroaO12Lna5jt9vVoUOHSh3Dxo+ZVyw3N1c+Pj7ungEANU5lvn8SqPtw/XqeiovN\n/XL5+fno6tVcd8+oEDtdi52uxU7X8PCw6aGHvCt1jDou2lIrFBdbRgdKkvH77mKna7HTtdhpBv4O\nCgBgJAIFADASgQIAGIlAAQCMRKAAAEYiUAAAIxEoAICRCBQAwEgECgBgJAIFADASgQIAGIlAAQCM\nRKAAAEYiUAAAIxEoAICRCBQAwEgECgBgJAIFADASgQIAGIlAAQCMRKAAAEYiUAAAIxEoAICRCBQA\nwEgECgBgpDruHlCT+Pn5uHtChfz967t7gm7nO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ola7HSdym7kx8wBAEbiFB8AwEgECgBgJAL1Penp6RoyZIh69eqlIUOGKCMjo8xt\niouLNXPmTIWGhqpnz55at26dcRsPHDigAQMGqF27dlqwYEG17rvLmZ3Lli1TWFiYoqKiNGDAAO3f\nv9/InRs2bFBERISioqIUERGhuLg4I3fede7cOT399NNu+b13ZmdMTIyef/559evXT/369dPs2bON\n3ClJW7ZsUXh4uMLDwxUREaFr164Zt3Py5MmKiopSv379FBUVpTZt2mjXrl1Gbbx27Zp+85vfKCIi\nQn369NGsWbNUXFxc8cEtlBg+fLiVmJhoWZZlJSQkWMOHDy9zm40bN1rR0dGWZVnW1atXre7du1sX\nLlwwamNGRoaVlpZmffDBB9b8+fOrbdv3ObNz//791u3bty3Lsqy0tDSrY8eOVn5+vnE7c3NzS36d\nl5dn/frXv7b+85//VNtGy3Jup2VZVlFRkTVs2DBr0qRJbvm9d2bn0qVL3fbn8i5ndh4/ftzq27ev\ndfXqVcuyLCsnJ8fIP5/fl5aWZnXu3NkqKCiojnmWZTm3ce7cuSW/5w6Hwxo0aJC1devWCo/NM6j/\nuXbtmtLS0tS3b19JUlhYmL788ktdv3691O22bt2qwYMHS5IaNmyoHj16aNu2bUZtbN68uQIDA2W3\n26tl1w85u/NXv/pVyU/3BAYGSlKZ25iw09vbu+TXN2/elMPhkM1WfS/S6exOSfroo48UHBysRx55\npNr23XU/Oy03/myWsztjY2P12muvqWHDhpIkHx8f1a1b17id37d+/XqFh4fL09PTqI02m015eXmy\nLEu3b9+Ww+FQo0aNKjw+gfqfzMxMNWrUqOQbj4eHhx5++GF9++23pW538eJFNWnSpOTjgICAans9\nLGc3uttP2blx40Y1b97cqT+0rnI/O1NSUhQWFqaQkBBFR0erVatWxu08deqUDhw4oJEjR1bbtu+7\nn6/n1q1bFRkZqejoaH3xxRdG7jx79qwyMjI0bNgw9e/fX8uXLzdy512FhYVKSkrSgAEDjNs4duxY\nff311+ratau6deumrl27qn379hUen0DB7T777DMtXbpUixcvdveUewoODlZSU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xgYKDOnDmjU6dOqaCgQDExMU69rXtYWJji\n4uJ05MgR9erV65636969uy5evKglS5aU+ruyF154QV9//bUSEhLkcDhUWFioEydO8HdQqDYECnCx\nQ4cOKTc3VyEhIZKkp556SkFBQXrhhRf0+eefa/To0eXeLyEhQSEhIerYsaPi4+O1cOFCSdIjjzyi\n3/72txo5cqR69uypjh07OrWjb9+++vzzz/Xcc8+pQYMG97xd3bp1FRoaqtTU1FLPtLy9vfWXv/xF\nW7ZsUbdu3dStWzctWrRIhYWFzn4pgErhH+oCAIzEMygAgJEIFADASAQKAGAkAgUAMBKBAgAYiUAB\nAIxEoAAARiJQAAAjESgAgJH+HwQ8SRjqGoVPAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15d1a8850>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.concat([dftrain, y_train], axis=1).groupby('sex').survived.mean().plot(kind='barh').set_xlabel('% survive')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "krkRHuMp3rJn"
   },
   "source": [
    "## Create feature columns and input functions\n",
    "The Gradient Boosting estimator can utilize both numeric and categorical features. Feature columns work with all TensorFlow estimators and their purpose is to define the features used for modeling. Additionally they provide some feature engineering capabilities like one-hot-encoding, normalization, and bucketization. In this tutorial, the fields in `CATEGORICAL_COLUMNS` are transformed from categorical columns to one-hot-encoded columns ([indicator column](https://www.tensorflow.org/api_docs/python/tf/feature_column/indicator_column)):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "upaNWxcF3rJn"
   },
   "outputs": [],
   "source": [
    "fc = tf.feature_column\n",
    "CATEGORICAL_COLUMNS = ['sex', 'n_siblings_spouses', 'parch', 'class', 'deck',\n",
    "                       'embark_town', 'alone']\n",
    "NUMERIC_COLUMNS = ['age', 'fare']\n",
    "\n",
    "def one_hot_cat_column(feature_name, vocab):\n",
    "  return tf.feature_column.indicator_column(\n",
    "      tf.feature_column.categorical_column_with_vocabulary_list(feature_name,\n",
    "                                                 vocab))\n",
    "feature_columns = []\n",
    "for feature_name in CATEGORICAL_COLUMNS:\n",
    "  # Need to one-hot encode categorical features.\n",
    "  vocabulary = dftrain[feature_name].unique()\n",
    "  feature_columns.append(one_hot_cat_column(feature_name, vocabulary))\n",
    "\n",
    "for feature_name in NUMERIC_COLUMNS:\n",
    "  feature_columns.append(tf.feature_column.numeric_column(feature_name,\n",
    "                                           dtype=tf.float32))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "74GNtFpStSAz"
   },
   "source": [
    "You can view the transformation that a feature column produces. For example, here is the output when using the `indicator_column` on a single example:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 51
    },
    "colab_type": "code",
    "id": "Eaq79D9FtmF8",
    "outputId": "d6db9dc1-a533-46c7-b78a-8ce367056a59"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Feature value: \"Third\"\n",
      "One-hot encoded:  [[ 0.  0.  1.]]\n"
     ]
    }
   ],
   "source": [
    "example = dict(dftrain.head(1))\n",
    "class_fc = tf.feature_column.indicator_column(tf.feature_column.categorical_column_with_vocabulary_list('class', ('First', 'Second', 'Third')))\n",
    "print('Feature value: \"{}\"'.format(example['class'].iloc[0]))\n",
    "print('One-hot encoded: ', tf.keras.layers.DenseFeatures([class_fc])(example).numpy())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "YbCUn3nCusC3"
   },
   "source": [
    "Additionally, you can view all of the feature column transformations together:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 102
    },
    "colab_type": "code",
    "id": "omIYcsVws3g0",
    "outputId": "165d15ee-4e7f-481d-f623-106f5dbc9d23"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 22.  ,   1.  ,   0.  ,   1.  ,   0.  ,   0.  ,   1.  ,   0.  ,\n",
       "          0.  ,   0.  ,   0.  ,   0.  ,   0.  ,   0.  ,   1.  ,   0.  ,\n",
       "          0.  ,   0.  ,   7.25,   1.  ,   0.  ,   0.  ,   0.  ,   0.  ,\n",
       "          0.  ,   0.  ,   1.  ,   0.  ,   0.  ,   0.  ,   0.  ,   0.  ,\n",
       "          1.  ,   0.  ]], dtype=float32)"
      ]
     },
     "execution_count": 0,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tf.keras.layers.DenseFeatures(feature_columns)(example).numpy()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "-UOlROp33rJo"
   },
   "source": [
    "Next you need to create the input functions. These will specify how data will be read into our model for both training and inference. You will use the `from_tensor_slices` method in the [`tf.data`](https://www.tensorflow.org/api_docs/python/tf/data) API to read in data directly from Pandas. This is suitable for smaller, in-memory datasets. For larger datasets, the tf.data API supports a variety of file formats (including [csv](https://www.tensorflow.org/api_docs/python/tf/data/experimental/make_csv_dataset)) so that you can process datasets that do not fit in memory."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "9dquwCQB3rJp"
   },
   "outputs": [],
   "source": [
    "# Use entire batch since this is such a small dataset.\n",
    "NUM_EXAMPLES = len(y_train)\n",
    "\n",
    "def make_input_fn(X, y, n_epochs=None, shuffle=True):\n",
    "  def input_fn():\n",
    "    dataset = tf.data.Dataset.from_tensor_slices((dict(X), y))\n",
    "    if shuffle:\n",
    "      dataset = dataset.shuffle(NUM_EXAMPLES)\n",
    "    # For training, cycle thru dataset as many times as need (n_epochs=None).\n",
    "    dataset = dataset.repeat(n_epochs)\n",
    "    # In memory training doesn't use batching.\n",
    "    dataset = dataset.batch(NUM_EXAMPLES)\n",
    "    return dataset\n",
    "  return input_fn\n",
    "\n",
    "# Training and evaluation input functions.\n",
    "train_input_fn = make_input_fn(dftrain, y_train)\n",
    "eval_input_fn = make_input_fn(dfeval, y_eval, shuffle=False, n_epochs=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "HttfNNlN3rJr"
   },
   "source": [
    "## Train and evaluate the model\n",
    "\n",
    "Below you will do the following steps:\n",
    "\n",
    "1. Initialize the model, specifying the features and hyperparameters.\n",
    "2. Feed the training data to the model using the `train_input_fn` and train the model using the `train` function.\n",
    "3. You will assess model performance using the evaluation set—in this example, the `dfeval` DataFrame. You will verify that the predictions match the labels from the `y_eval` array.\n",
    "\n",
    "Before training a Boosted Trees model, let's first train a linear classifier (logistic regression model). It is best practice to start with simpler model to establish a benchmark."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 221
    },
    "colab_type": "code",
    "id": "JPOGpmmq3rJr",
    "outputId": "0b6bd66c-90fb-40b6-ed15-7130ff63627e"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy                  0.765152\n",
      "accuracy_baseline         0.625000\n",
      "auc                       0.832844\n",
      "auc_precision_recall      0.789631\n",
      "average_loss              0.478908\n",
      "global_step             100.000000\n",
      "label/mean                0.375000\n",
      "loss                      0.478908\n",
      "precision                 0.703297\n",
      "prediction/mean           0.350790\n",
      "recall                    0.646465\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "linear_est = tf.estimator.LinearClassifier(feature_columns)\n",
    "\n",
    "# Train model.\n",
    "linear_est.train(train_input_fn, max_steps=100)\n",
    "\n",
    "# Evaluation.\n",
    "result = linear_est.evaluate(eval_input_fn)\n",
    "clear_output()\n",
    "print(pd.Series(result))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "BarkNXwA3rJu"
   },
   "source": [
    "Next let's train a Boosted Trees model. For boosted trees, regression (`BoostedTreesRegressor`) and classification (`BoostedTreesClassifier`) are supported. Since the goal is to predict a class - survive or not survive, you will use the `BoostedTreesClassifier`.\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 221
    },
    "colab_type": "code",
    "id": "tgEzMtlw3rJu",
    "outputId": "2ac2d0f9-a7e9-46aa-d8f5-569a65c32251"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy                  0.829545\n",
      "accuracy_baseline         0.625000\n",
      "auc                       0.872788\n",
      "auc_precision_recall      0.857807\n",
      "average_loss              0.411839\n",
      "global_step             100.000000\n",
      "label/mean                0.375000\n",
      "loss                      0.411839\n",
      "precision                 0.793478\n",
      "prediction/mean           0.381942\n",
      "recall                    0.737374\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "# Since data fits into memory, use entire dataset per layer. It will be faster.\n",
    "# Above one batch is defined as the entire dataset.\n",
    "n_batches = 1\n",
    "est = tf.estimator.BoostedTreesClassifier(feature_columns,\n",
    "                                          n_batches_per_layer=n_batches)\n",
    "\n",
    "# The model will stop training once the specified number of trees is built, not\n",
    "# based on the number of steps.\n",
    "est.train(train_input_fn, max_steps=100)\n",
    "\n",
    "# Eval.\n",
    "result = est.evaluate(eval_input_fn)\n",
    "clear_output()\n",
    "print(pd.Series(result))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "hEflwznXvuMP"
   },
   "source": [
    "Now you can use the train model to make predictions on a passenger from the evaluation set. TensorFlow models are optimized to make predictions on a batch, or collection, of examples at once. Earlier,  the `eval_input_fn` is  defined using the entire evaluation set."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 289
    },
    "colab_type": "code",
    "id": "6zmIjTr73rJ4",
    "outputId": "f934b588-cc13-4b5b-e9d1-5253606fa40d"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAA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\nxNSpU8UPP/wghLh9RU18fLzo16+f6N+/v9i5c6cjS7YbKb0YNWqUCA8PFyNGjBDDhw8XI0aMED/9\n9JMjy7YLKb24U3JycqO92kpKL0wmk1ixYoUYPHiwiIiIEG+//bYjS7YbKb3Izs4WkyZNEkOHDhVD\nhgwRS5cuFUaj0ZFl28XSpUtFz549xRNPPCG6d+8uIiIihBDWf3fy8SRERCRbg5i2IiIi58LwICIi\n2RgeREQkG8ODiIhkY3gQEZFsDA8iIpKN4UFERLIxPIiISLb/A+ehpDT73FBfAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15dfa9390>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "pred_dicts = list(est.predict(eval_input_fn))\n",
    "probs = pd.Series([pred['probabilities'][1] for pred in pred_dicts])\n",
    "\n",
    "probs.plot(kind='hist', bins=20, title='predicted probabilities')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "mBUaNN1BzJHG"
   },
   "source": [
    "Finally you can also look at the receiver operating characteristic (ROC) of the results, which will give us a better idea of the tradeoff between the true positive rate and false positive rate."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "colab": {
     "height": 307
    },
    "colab_type": "code",
    "id": "NzxghvVz3rJ6",
    "outputId": "98bcd7d1-35b8-4593-b22f-ca020c2323fa"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEiCAYAAAA8ij+xAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xlc1HX+B/DXzCAIAnIIOOCRdohHHngveCEKCopaXkVh\npqSp66b91DSF1dXSrTVXwrRcw2zdtDTF1NV0KzMSTVdtEzWPQG45HAE5Zubz+4OYaeLwC8PMMPB6\nPh4+iu98Z+Y974fOi8/3+HxkQggB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BHNzc3Hy5Ek8ePAANjY2cHBw0F0uPH36dGzdulV3Uvv+/fs4evRore8bFxeHkpISXL9+\nHfv27UNoaCgAIDQ0FFu2bEFeXh7y8vIQFxeH8PBwAMBXX32FlJQUAICDgwMUCgVsbKr+7tamTRuk\npaXVehI7LCwMhw8fRkJCgkEITpkyBf/6179w6dIlXX++/vprFBcX1/p5KhUVFcHGxgYuLi4oKytD\nbGwsioqKaqzNw8MD/v7+WLduHQoLCyGEQGpqaq33zFDzwZEJNVq//+03Ojoab775JtasWYP+/ftj\n7NixUKlUVfbXarXYsWMHli5dCplMBl9fX0RHRwMAgoKCUFxcjFdeeQUZGRlwcnLCH/7wh2oPl1Ua\nMGAARo0aBSEEZs2ahcGDBwMAXn75ZRQVFWH8+PG6EcScOXMAALdv38bq1auRn5+P1q1b49lnn0W/\nfv2qfK6QkBAcPHgQAwcORLt27bBv374qn7tnz55wcHBATk4Ohg4dqtveo0cPrFmzBqtXr0ZKSgrs\n7OzQt29f9O/fX1I/K69QCw4OhoODA2bMmGFwGKy62tavX4+33noLoaGhKC4uRvv27TFr1qwae0fN\nB29aJKqBtd4ISWQJ/BdCVAv+rkUkDcOEqBY80UwkDQ9zERGR0TgyISIiozFMiIjIaAwTIiIyGsOE\niIiMxjAhIiKjMUyIiMho/w/TWJJiO+X3vQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fd15c907f50>"
      ]
     },
     "metadata": {
      "tags": []
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.metrics import roc_curve\n",
    "\n",
    "fpr, tpr, _ = roc_curve(y_eval, probs)\n",
    "plt.plot(fpr, tpr)\n",
    "plt.title('ROC curve')\n",
    "plt.xlabel('false positive rate')\n",
    "plt.ylabel('true positive rate')\n",
    "plt.xlim(0,)\n",
    "plt.ylim(0,)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [],
   "name": "boosted_trees.ipynb",
   "toc_visible": true,
   "version": "0.3.2"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
